<template>
	    <el-select v-model="areaCode" placeholder="请选择县区" filterable size="small" clearable @change="getDiqu" style="width: 130px;">
	        <el-option
	          v-for="item in options"
	          :key="item.areaCode"
	          :label="item.areaName"
	          :value="item.areaCode">            
	        </el-option>
	    </el-select>
</template>

<script>
import { getRegion } from '@/api/data'
export default {
	data() {
		return { 
      		options:[],           
      		areaCode:'' 
		}
	},
	mounted: function () {
	    this.getArea()
	},
	methods: {     
        getArea() { 
            let  ciyCode = '022002'
            getRegion( ciyCode ).then((res) => { 
                this.options = res.data                   
            })
        },
        getDiqu() {
        	this.$emit('getMessage', this.areaCode)
        }

	}
}
 </script>